<!--
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/business/storagechannel/StorageChannel.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/business/storagechannel/StorageChannel.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'Id',
                footer: "Foots",
                cnName: '立库通道',
                name: 'storagechannel/StorageChannel',
                url: "/StorageChannel/",
                sortName: "StorageChannelNo",
                foreignKey:"StorageChannelId"
            });
            const editFormFields = ref({"StorageChannelName":"","StorageChannelNo":"","LocationDescription":"","Enable":""});
            const editFormOptions = ref([[{"title":"通道名称","field":"StorageChannelName"},
                               {"title":"通道编号","field":"StorageChannelNo"},
                               {"title":"描述","field":"LocationDescription"}],
                              [{"dataKey":"enable","data":[],"title":"是否启用","field":"Enable","type":"select"}]]);
            const searchFormFields = ref({"StorageChannelName":"","StorageChannelNo":"","LocationDescription":""});
            const searchFormOptions = ref([[{"title":"通道名称","field":"StorageChannelName"},{"title":"通道编号","field":"StorageChannelNo"},{"title":"描述","field":"LocationDescription"}]]);
            const columns = ref([{field:'Id',title:'主键',type:'string',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'StorageChannelName',title:'通道名称',type:'string',link:true,width:110,align:'left',sort:true},
                       {field:'StorageChannelNo',title:'通道编号',type:'string',width:110,align:'left'},
                       {field:'LocationDescription',title:'描述',type:'string',width:110,align:'left'},
                       {field:'Enable',title:'是否启用',type:'int',bind:{ key:'enable',data:[]},width:110,align:'left'},
                       {field:'CreateUserName',title:'添加人',type:'string',width:110,align:'left'},
                       {field:'CreateUserId',title:'添加人ID',type:'string',width:110,hidden:true,align:'left'},
                       {field:'CreateDate',title:'添加时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'ModifyUserName',title:'修改人',type:'string',width:110,align:'left'},
                       {field:'ModifyUserId',title:'修改人ID',type:'string',width:110,hidden:true,align:'left'},
                       {field:'ModifyDate',title:'修改时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'DeletionFlag',title:'删除标识',type:'int',width:110,hidden:true,align:'left'}]);
            const detail = ref({
                cnName: "库位信息",
                table: "WarehouseLocation",
                columns: [{field:'Id',title:'主键',type:'string',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'StorageChannelId',title:'通道ID',type:'string',width:110,hidden:true,align:'left'},
                       {field:'StorageChannelNo',title:'通道编号',type:'string',width:110,align:'left',sort:true},
                       {field:'WarehouseLocationNo',title:'库位号',type:'string',width:110,edit:{type:''},align:'left'},
                       {field:'ConfigurationWeight',title:'可放置重量',type:'decimal',width:110,edit:{type:''},align:'left'},
                       {field:'CurrentMaterialBox',title:'当前箱号',type:'string',width:110,edit:{type:''},align:'left'},
                       {field:'MaterialBoxRFID',title:'当前物料箱RFID号',type:'string',width:110,edit:{type:''},align:'left'},
                       {field:'LocationDescription',title:'位置描述',type:'string',width:180,edit:{type:''},align:'left'},
                       {field:'Enable',title:'是否启用',type:'int',bind:{ key:'enable',data:[]},width:110,edit:{type:'select'},align:'left'},
                       {field:'CreateUserName',title:'添加人',type:'string',width:110,align:'left'},
                       {field:'CreateUserId',title:'添加人ID',type:'string',width:110,hidden:true,align:'left'},
                       {field:'CreateDate',title:'添加时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'ModifyUserName',title:'修改人',type:'string',width:110,align:'left'},
                       {field:'ModifyUserId',title:'修改人ID',type:'string',width:110,hidden:true,align:'left'},
                       {field:'ModifyDate',title:'修改时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'DeletionFlag',title:'删除标识',type:'int',width:110,hidden:true,align:'left'}],
                sortName: "StorageChannelNo",
                key: "Id"
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
